#ifndef MYFRAME_H
#define MYFRAME_H

#include <QWidget>
#include <QFrame>
#include <QVector>
#include <QPoint>

class MyFrame : public QFrame
{
    Q_OBJECT
public:
    explicit MyFrame(QWidget *parent = 0);

signals:
protected:
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);

    void paintEvent(QPaintEvent *);

public slots:
private:
    QVector<QVector<QPoint> > lines;

    void paintLine(QPainter& painter,
                   const QVector<QPoint>& line);
};

#endif // MYFRAME_H
